<template>
    <div>
        <h1>熊大</h1>
        <button @click="give">把蜂蜜罐给熊二</button>
        <button @click="giveChild">把蜂蜜罐给小熊二</button>
    </div>
</template>

<script>

export default{
    data(){
        return{
            msg:'蜂蜜罐',
        };
    },
    mounted(){
        console.log(this);
    },
    methods:{
        give(){
            this.$eventBus.$emit("fengmiguan",this.msg);
        },
        giveChild(){
            this.$eventBus.$emit('dabogei',this.msg);
        },
    },
};
</script>

<style lang="scss" scoped>

</style>